<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head id="ctl02_head1">
<meta charset="UTF-8">

<TITLE>	 ${qnpub.title} </TITLE>

<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
<META http-equiv="Expires" content="0">
	<link rel="stylesheet" type="text/css" href="${ctxPath}/include/css/themes/bootstrap/easyui.css">
	<link rel="stylesheet" type="text/css" href="${ctxPath}/include/css/themes/color.css">
	<link rel="stylesheet" type="text/css" href="${ctxPath}/include/css/themes/icon.css">
	<script type="text/javascript" src="${ctxPath}/include/js/jquery.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/include/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/include/js/easyui-lang-zh_CN.js"></script>
	<script>var ksid="${qnpub.id}";</script>
	<LINK rel="stylesheet" type="text/css" href="${ctxPath}/include/css/qncount.css">
</HEAD> 
<BODY style='background-color: rgb(176, 224, 250);'>
<DIV id="container">
<DIV id="ctl02_header" style="width: 920px; -ms-overflow-x: hidden; background-repeat: repeat-x;">
<DIV style="display: none;"></DIV>
</DIV>
<DIV>            
<DIV id="ctl02_wenjuan" style="padding-bottom: 15px; margin-left: 10px;">
        
<DIV style="margin: 20px 0px; line-height: 28px; padding-left: 20px;">
<DIV style="text-align: center; padding-top: 10px;">
	<B><SPAN style="font-size: 24px;">${qnpub.title} </SPAN></B>
</DIV></DIV>

<!-- 统计表、图 -->
<DIV style="background: rgb(255, 255, 255); margin: 0px auto; padding: 0px 30px 20px; width: 850px;">
<!-- 各学院未参调人数 -->
<div><a id="o2x" href="#" class="easyui-linkbutton c4" data-options="iconCls:'icon-excel'" style="height:32px;">导出到Excel</a></div>
<table id="dg1" cellpadding="2" ></table>
<script type="text/javascript">

$(function(){
	$("#o2x").click(function(){
		location.href="${ctxPath}/qn/countuser2xls?ksid="+ksid+"&sys_random=" + Math.random();
	});
	$("#loading").show();
	$("#dg1").datagrid({
		title:"  参加问卷调查的人数统计",
		width:650,nowrap:false,
		striped:true,border:true,collapsible:false,
		url:"${ctxPath}/qn/doCount3",          	        
        queryParams:{"ksid":ksid},
		rownumbers:true,
		showFooter: true,
		loadMsg:'数据加载中...' ,
		columns:[[
        		{title:'学院', field:'xy',width:200},
				{title:'实参人数', field:'acnt',width:80,formatter: function(value,row,index){
						return "<span style='color:green;font-weight:bold;'>" + row.acnt + " </span>";
					}
				},
				{title:'应参人数', field:'toben',width:80},
				{title:'未参人数', field:'nocnt',width:80,formatter: function(value,row,index){
						return "<span style='color:red;font-weight:bold;'>" + row.nocnt + " </span>";
					}
				},
				{title:'参与率', field:'a',width:80,formatter: function(value,row,index){
						return "<span style='color:blue;font-weight:bold;'>" + Number(row.acnt*100 /row.toben).toFixed(1) + "% </span>";
					}
				}
          ]],
          onLoadSuccess:function(data){
        	  $("#loading").hide();
         	 if(data.total==0){
         		 parent.$.iMessager.show({
         			    title:'系统提示',
         			    msg:'<span style="color:#f00">暂无相关记录。</span>',
         			    timeout:5000,
         			    showType:'slide',
         			    width:500,
         			    height:200,
         			    style:{
         			        right:'',
         			        top:document.body.scrollTop+document.documentElement.scrollTop+70,
         			        bottom:''
         			    }
         			});
         	 }
          }     
	});
})
</script>
<% if (me.role=='3') {%>
<!-- 院级管理员 -->
<table id="dg2" cellpadding="2" ></table>
<div id="tb2" style="padding:5px;text-align: right;">
<input id="noqn" class="easyui-textbox" data-options="iconCls:'icon-man',iconWidth:38" style="width:220px;height:32px;">
	<a id="s_qnpub2" href="#" class="easyui-linkbutton" style="margin-right: 10px;margin-left: 10px;height:32px;" data-options="iconCls:'icon-remove'">查看各班未参加问卷调查人数</a>
<!--
	<a id="logout" href="#" class="easyui-linkbutton" style="margin-right: 10px;height:32px;" data-options="iconCls:'icon-cancel'">退出</a>
-->
</div>
<script type="text/javascript">
var s_name2="";
function loadGrid2(){
	$("#dg2").propertygrid({
		title:"${me.xy}--未参加问卷调查的名单",
		width:550,height:500,nowrap:false,
		striped:true,border:true,collapsible:false,
		url:"${ctxPath}/qn/listNoQn",          	        
        queryParams:{"s_name":s_name2,"ksid":ksid},
		rownumbers:true,
		groupField:"bj",
		showGroup: true,
		groupFormatter:function(group,rows){
			return group + ' ( <span style="color:red">' + rows.length + ' 人</span>)';
		},
		
		loadMsg:'数据加载中...' ,
		columns:[[
        		  {title:'班级', field:'bj',width:100},
					{title:'考号', field:'uid',width:80},
	        	  	{title:'姓名', field:'xm',width:80}
	          ]],
	    onLoadSuccess:function(data){
	    	$("#noqn").textbox("setValue","未参加问卷调查总人数："+data.total);
	    },
		toolbar:'#tb2'     
	});
	
}

$(function(){
	loadGrid2();
	$("#dg2").propertygrid("collapseGroup");
	$("#s_qnpub2").click(function(){
		$("#dg2").propertygrid("collapseGroup");
		//s_name2=$("#s_name").val();
		//loadGrid2();
	});
	$("#tb2").bind("keydown",function(e){            
		var theEvent = e || window.event; // 兼容FF和IE和Opera   
		var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
		if (code == 13) {//回车执行查询
            $("#s_qnpub2").click();
        }    
	});
})
</script>
<%}%>
<DIV class="go" id="divGo"><A title="返回顶部" class="top" onclick="gotop();" href="javascript:void(0);"></A><A 
title="返回底部" class="bottom" onclick="gobottom();" 
href="javascript:void(0);"></A></DIV>
<DIV style="clear: both;"></DIV>
<DIV style="height: 20px;"></DIV>

</DIV>
<DIV style="clear: both;"></DIV></DIV>
</DIV>
<script type="text/javascript">
function gotop(){
    window.scroll(0,0);
}
 function gobottom(){
    window.scroll(0,99999);
 }
    </script>
    <% include("loading.html"){}%>
</BODY></HTML>
